package com.engine4cloud.tdf.supervision.dto.create;

import com.engine4cloud.tdf.supervision.dto.JzdxCrimeInfoDTO;
import com.engine4cloud.tdf.supervision.dto.JzdxFileDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

/**
 * 终端社区矫正人员基本信息-请求对象
 *
 * @author wenjie
 * @date 2024-07-19 11:20:26
 */
@Data
@Schema(description = "终端社区矫正人员基本信息-请求对象")
public class TerminalBaseInfoCreateDTO implements Serializable {
    /**
     * 姓名
     */
    @Schema(description = "姓名", example = "张三")
    @NotBlank(message = "姓名不能为空")
    private String xm;

    /**
     * 性别
     */
    @Schema(description = "性别", example = "1")
    @NotBlank(message = "性别不能为空")
    private String xb;

    /**
     * 证件类型
     */
    @Schema(description = "证件类型", example = "01")
    @NotBlank(message = "证件类型不能为空")
    private String zjlx;

    /**
     * 证件号
     */
    @Schema(description = "证件号", example = "610***************")
    @NotBlank(message = "证件号不能为空")
    private String zjh;

    /**
     * 出生日期
     */
    @Schema(description = "出生日期")
    @NotNull(message = "出生日期不能为空")
    private LocalDate csrq;

    /**
     * 民族
     */
    @Schema(description = "民族", example = "01")
    @NotBlank(message = "民族不能为空")
    private String mz;

    /**
     * 文化程度
     */
    @Schema(description = "文化程度", example = "01")
    @NotBlank(message = "文化程度不能为空")
    private String whcd;

    /**
     * 婚姻状况
     */
    @Schema(description = "婚姻状况", example = "01")
    @NotBlank(message = "婚姻状况不能为空")
    private String hyzk;

    /**
     * 原政治面貌
     */
    @Schema(description = "原政治面貌", example = "01")
    @NotBlank(message = "现政治面貌不能为空")
    private String yzzmm;

    /**
     * 个人联系电话
     */
    @Schema(description = "个人联系电话", example = "177****7711")
    @NotBlank(message = "个人联系电话不能为空")
    private String grlxdh;

    /**
     * 固定居住地明细
     */
    @Schema(description = "固定居住地明细", example = "**村**号")
    @NotBlank(message = "固定居住地明细不能为空")
    private String gdjzdmx;

    /**
     * 户籍所在地明细
     */
    @Schema(description = "户籍所在地明细", example = "**村**号")
    @NotBlank(message = "户籍所在地明细不能为空")
    private String hjszdmx;

    /**
     * 社区矫正期限
     */
    @Schema(description = "社区矫正期限", example = "2年")
    @NotBlank(message = "社区矫正期限不能为空")
    private String sqjzqx;

    /**
     * 社区矫正开始日期
     */
    @Schema(description = "社区矫正开始日期", example = "2024-01-01")
    @NotNull(message = "社区矫正开始日期不能为空")
    private LocalDate sqjzksrq;

    /**
     * 社区矫正结束日期
     */
    @Schema(description = "社区矫正结束日期", example = "2027-01-01")
    @NotNull(message = "社区矫正结束日期不能为空")
    private LocalDate sqjzjsrq;

    /**
     * 罪名不能为空，根据罪名可以获取犯罪类型
     */
    @Schema(description = "罪名", example = "[{\"jtzm\": \"15\",\"zmmc\": \"纵火罪\"}]")
    @NotEmpty(message = "罪名不能为空")
    private List<JzdxCrimeInfoDTO> crimeInfoList;

    /**
     * 附加刑
     */
    @Schema(description = "附加刑", example = "01")
    @NotBlank(message = "附加刑不能为空")
    private String fjx;

    /**
     * 主要犯罪事实
     */
    @Schema(description = "主要犯罪事实")
    @NotBlank(message = "主要犯罪事实不能为空")
    @Size(max = 2000, message = "主要犯罪事实不能超过2000个字符")
    private String zyfzss;
    /**
     * 矫正对象照片
     */
    @Schema(description = "矫正对象照片",
            example = """
                    [{"name": "09468fc20f2544e28891a058858fdf58.png",
                    "url": "/supervision/oss-file/oss/file?fileName=09468fc20f2544e28891a058858fdf58.png"}
                    ]""")
    @NotEmpty(message = "矫正对象照片不能为空")
    private List<JzdxFileDTO> photoList;
}